<template>
  <view class="my-container">
    <!-- 用户信息头部 -->
    <view class="user-header">
      <view class="user-info">
        <image class="avatar" src="/static/avatar-placeholder.png" mode="aspectFill"></image>
        <view class="info-right">
          <text class="nickname">用户昵称</text>
          <text class="user-id">ID: 888888</text>
        </view>
      </view>
    </view>

    <!-- 用户数据概览 -->
    <view class="user-stats">
      <view class="stat-item">
        <text class="number">0</text>
        <text class="label">收藏</text>
      </view>
      <view class="stat-item">
        <text class="number">0</text>
        <text class="label">关注</text>
      </view>
      <view class="stat-item">
        <text class="number">0</text>
        <text class="label">足迹</text>
      </view>
    </view>

    <!-- 功能列表 -->
    <view class="feature-list">
      <view class="feature-group">
        <view class="feature-item" v-for="(item, index) in features" :key="index">
          <text class="feature-icon">{{ item.icon }}</text>
          <text class="feature-name">{{ item.name }}</text>
          <text class="arrow">&gt;</text>
        </view>
      </view>
    </view>
  </view>
</template>

<script setup lang="ts">
import { ref } from 'vue'

const features = ref([
  { icon: '📦', name: '我的订单' },
  { icon: '🎁', name: '优惠券' },
  { icon: '📍', name: '收货地址' },
  { icon: '⚙️', name: '设置' }
])
</script>

<style lang="scss">
.my-container {
  min-height: 100vh;
  background-color: #f5f5f5;
}

.user-header {
  background-color: #007AFF;
  padding: 40rpx 30rpx;
  
  .user-info {
    display: flex;
    align-items: center;
    
    .avatar {
      width: 120rpx;
      height: 120rpx;
      border-radius: 60rpx;
      background-color: #fff;
    }
    
    .info-right {
      margin-left: 20rpx;
      
      .nickname {
        font-size: 32rpx;
        color: #fff;
        font-weight: 500;
      }
      
      .user-id {
        font-size: 24rpx;
        color: rgba(255, 255, 255, 0.8);
        margin-top: 8rpx;
      }
    }
  }
}

.user-stats {
  margin: 20rpx;
  background-color: #fff;
  border-radius: 12rpx;
  padding: 30rpx 0;
  display: flex;
  justify-content: space-around;
  
  .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    
    .number {
      font-size: 36rpx;
      font-weight: bold;
      color: #333;
    }
    
    .label {
      font-size: 24rpx;
      color: #666;
      margin-top: 8rpx;
    }
  }
}

.feature-list {
  margin: 20rpx;
  
  .feature-group {
    background-color: #fff;
    border-radius: 12rpx;
    overflow: hidden;
    
    .feature-item {
      display: flex;
      align-items: center;
      padding: 30rpx;
      border-bottom: 1rpx solid #eee;
      
      &:last-child {
        border-bottom: none;
      }
      
      .feature-icon {
        font-size: 40rpx;
        margin-right: 20rpx;
      }
      
      .feature-name {
        flex: 1;
        font-size: 28rpx;
        color: #333;
      }
      
      .arrow {
        font-size: 24rpx;
        color: #999;
      }
    }
  }
}
</style> 